import 'package:flutter/material.dart';
import 'package:yuwei_study_language_tools_flutter/widget/subtitle_widget.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(body: TestWidget()),
    );
  }
}

class TestWidget extends StatefulWidget {
  const TestWidget({super.key});

  @override
  State<TestWidget> createState() => _TestWidgetState();
}

class _TestWidgetState extends State<TestWidget> {
  @override
  Widget build(BuildContext context) {
    String subtitle = "How old are you?";
    List<String> inputWords = [];
    inputWords.add("ho");
    inputWords.add("are");
    inputWords.add("yo");

    return Column(
      children: [
        SubtitleWidget(
          height: 80,
          fontSize: 25,
          showSubtitle: true,
          subtitle: subtitle,
          inputWords: inputWords,
          textColor: Colors.green,
          wrongTextColor: Colors.red,
          backgroundColor: Colors.lightBlue,
          showUnderLine: true,
          undLineColor: Colors.white,
        ),
        SubtitleWidget(
          height: 80,
          fontSize: 25,
          showSubtitle: true,
          subtitle: subtitle,
          // inputWords: inputWords,
          textColor: Colors.blue,
          wrongTextColor: Colors.blue,
          backgroundColor: Colors.black,
        ),
        SubtitleWidget(
          height: 80,
          fontSize: 25,
          showSubtitle: true,
          subtitle: subtitle,
          inputWords: inputWords,
          textColor: Colors.green,
          wrongTextColor: Colors.black,
          backgroundColor: Colors.black,
          showUnderLine: true,
          undLineColor: Colors.white,
        ),
      ],
    );
  }
}
